#include "defaultstartcamerainfoactor.h"
#include "datatypedefine.h"
#include "vectorproperties.h"

namespace VrDataCore
{
	DefaultStartCameraInfoActor::DefaultStartCameraInfoActor()
	{
		setClassName(CLASS_CAMERA_START_INFO);
		_defaultAttitudeList.push_back(osg::Vec3(500,500,500));
		_defaultAttitudeList.push_back(osg::Vec3(0,0,0));
		_defaultAttitudeList.push_back(osg::Vec3(0,0,1));
		_roamAttitudeList.push_back(osg::Vec3(47.0f,27.0f,1.6f));
		_roamAttitudeList.push_back(osg::Vec3(26.0f,27.0f,1.6f));
		_roamAttitudeList.push_back(osg::Vec3(0,0,1));
	}

	DefaultStartCameraInfoActor::~DefaultStartCameraInfoActor()
	{}

	void DefaultStartCameraInfoActor::buildPropertyMap()
	{
		addProperty(new Vec3fListProperty<DefaultStartCameraInfoActor>(XML_ELEMENT_DATATYPE_VEC3FLIST,
			"Camrea Attitude","",this,&DefaultStartCameraInfoActor::setRoamStartInfo,
			&DefaultStartCameraInfoActor::getRoamStartInfo,"",""));
		addProperty(new Vec3fListProperty<DefaultStartCameraInfoActor>(XML_ELEMENT_DATATYPE_VEC3FLIST,
			"MainManipulator Attitude","",this,&DefaultStartCameraInfoActor::setDefaultStartInfo,
			&DefaultStartCameraInfoActor::getDefaultStartInfo,"",""));
	}

	void DefaultStartCameraInfoActor::setRoamStartInfo(QList<osg::Vec3> data)
	{
		_roamAttitudeList = data;
	}

	QList<osg::Vec3> DefaultStartCameraInfoActor::getRoamStartInfo()
	{
		return _roamAttitudeList;
	}

	void DefaultStartCameraInfoActor::setDefaultStartInfo(QList<osg::Vec3> data)
	{
		_defaultAttitudeList = data;
	}

	QList<osg::Vec3> DefaultStartCameraInfoActor::getDefaultStartInfo()
	{
		return _defaultAttitudeList;
	}
}